@import (reference) 'mongodb-compass/src/app/styles/index.less';

.rt {
  height: 100%;
}
.rt-perf {
  .listview {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.rt__lists-out {
  display: flex;
  justify-content: center;
}

.rt-lists {
  display: flex;
  flex-direction: column;
  flex: 1;
  flex-basis: 290px;
  width: 440px;
  overflow: hidden;
  box-sizing: padding-box;
  -moz-box-sizing: padding-box;
  -webkit-box-sizing: padding-box;
  padding-top: 35px;
}

.rt-details {
  width: 440px;
  padding-top: 35px;
}
.rt-lists:last-child {
  margin-right: 0;
  margin-bottom: 25px;
}
.rt-lists__listdiv {
  height: 100%;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}
.rt-lists__item,
.rt-lists__empty-error {
  position: relative;
  width: 100%;
  height: 46px;
  background-color: @palette__gray--dark-3;
  margin-bottom: 1px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.rt-lists__item--slow {
  cursor: pointer;
  justify-content: flex-start;
  align-items: center;
}

.rt-lists__item--slow:hover {
  background-color: @palette__black;
}

.rt-lists__empty-error {
  padding-top: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: @palette__white;
  text-anchor: middle;
  padding-left: 150px;
}
.rt-lists__item:last-child {
  border-bottom: none;
}

/* LAYOUT */
.rt-lists__header {
  margin-top: -4px;
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-bottom: 0;
}

.rt-details__header {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-bottom: 0;
  align-items: baseline;
  margin-top: -12px;
}

.rt-lists__headerlabel,
.rt-details__headerlabel {
  color: @palette__white;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: bold;
  flex-grow: 1;
  margin: 0;
  margin-bottom: 4px;
}

.rt-lists__headerlabel--right {
  text-align: right;
}

/* SHARED */
.rt-lists__tab {
  width: 9px;
}
.rt-lists__load {
  font-weight: 300;
  font-size: 12px;
  color: @palette__white;
  position: absolute;
  top: 15px;
  right: 25px;
}

/* HOT */
.rt-lists__collection-hot {
  font-weight: 500;
  font-size: 12px; /* collection name */
  color: @palette__white;
  position: absolute;
  top: 5px;
  left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 80%;
}
.rt-lists__rw {
  display: flex;
  flex-direction: row;
  align-items: flex-end; /* R/W bars go at bottom */
  // background-color: @palette__gray--dark-3;
  font-weight: 500;
  font-size: 9px; /* R/W */
  color: @palette__white;
}
.rt-lists__r {
  /* R/W bar */
  height: 14px;
  width: 30%;
  background-color: @palette__gray--dark-1;
  padding: 2px 0 0 4px;
}
.rt-lists__w {
  height: 14px;
  width: 70%;
  background-color: @palette__gray--dark-2;
  padding: 2px 0 0 4px;
}

/* SLOW */
.rt-lists__op {
  color: @palette__white;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  padding: 1px 0 1px 0;
  background-color: @palette__gray--dark-1;
  border-radius: 2px;
  flex: 0 0 60px;
  position: relative;
  margin: 1px 5px 0 5px;
}
.rt-lists__collection-slow {
  font-weight: 500;
  font-size: 12px;
  color: @palette__white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 2;
  margin: 0 5px;
}
.rt-lists__time {
  font-weight: 300;
  font-size: 12px;
  color: @palette__white;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  margin: 0 5px;
}

/* DETAIL VIEW */
.rt-details__body {
  display: block;
  position: relative;
  background-color: @palette__gray--dark-3;
  font-size: 10px;
  font-weight: 500;
  height: 600px;
}

.rt-details__opinfo {
  border-bottom: @palette__gray--dark-2 1px solid;
  height: 40px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;

  div {
    margin: 0 5px;

    &.rt-details__op {
      color: @palette__white;
      text-transform: uppercase;
      text-align: center;
      padding: 1px 0 1px 0;
      background-color: @palette__gray--dark-1;
      border-radius: 2px;
      flex: 0 0 60px;
      position: relative;
      margin-top: 1px;
    }

    &.rt-details__collection-slow {
      color: @palette__white;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 14px;
      flex-grow: 2;
    }

    &.rt-details__time {
      color: @palette__white;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 14px;
      flex-grow: 1;
    }
  }
}

.rt-details__list {
  display: flex;
  flex-direction: column;
  margin-left: 30px;
  padding-left: 0;
  margin-top: 10px;
}
.rt-details__item {
  position: relative;
  width: 100%;
  height: 30px;
  display: flex;
  flex-direction: row;
  padding-top: 10px;
}
.rt-details__datatype {
  position: absolute;
  color: @palette__gray--light-1;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: bold;
}
.rt-details__datatype-val {
  position: absolute;
  color: @palette__white;
  font-size: 14px;
  left: 100px;
}

.rt-details__raw {
  font-family: 'Source Code Pro', Menlo, monospace;
  color: @palette__white;
  background-color: @palette__black;
  font-size: 12px;
  font-weight: 300;
  margin-top: 20px;
  margin-left: 20px;
  margin-right: 20px;
  overflow-y: auto;
  word-wrap: break-word; /* IE>=5.5 */
  white-space: pre; /* IE>=6 */
  white-space: -moz-pre-wrap; /* For Fx<=2 */
  white-space: pre-wrap; /* Fx>3, Opera>8, Safari>3*/
  height: 360px;
  padding: 16px;
}
